﻿Public Class FormEntrada
    Private _CampeonatoActivo As Integer
    Private _RondasTorneo As Integer
    Private _NombreTorneo As String
    Private _TipoTorneo As String

    Public Property CampeonatoActivo As Integer
        Get
            Return Me._CampeonatoActivo
        End Get
        Set(value As Integer)
            Me._CampeonatoActivo = value
        End Set
    End Property

    Public Property RondasTorneo() As Integer
        Get
            Return _RondasTorneo
        End Get
        Set(ByVal value As Integer)
            _RondasTorneo = value
        End Set
    End Property

    Public Property NombreTorneo() As String
        Get
            Return _NombreTorneo
        End Get
        Set(ByVal value As String)
            _NombreTorneo = value
        End Set
    End Property

    Public Property TipoTorneo() As String
        Get
            Return _TipoTorneo
        End Get
        Set(ByVal value As String)
            _TipoTorneo = value
        End Set
    End Property

    Private Sub AltaToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles AltaToolStripMenuItem1.Click
        FormAltaJugador.MdiParent = Me
        FormAltaJugador.Show()
    End Sub

    Private Sub BajaToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles BajaToolStripMenuItem1.Click
        FormBajaJugador.MdiParent = Me
        FormBajaJugador.Show()
    End Sub

    Private Sub ConsultaToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles ConsultaToolStripMenuItem1.Click
        FormModificarJugador.MdiParent = Me
        FormModificarJugador.Show()
    End Sub

    Private Sub AltaToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AltaToolStripMenuItem.Click
        FormAltaEquipo.MdiParent = Me
        FormAltaEquipo.Show()
    End Sub

    Private Sub ConsultaToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ConsultaToolStripMenuItem.Click
        FormModificarEquipo.MdiParent = Me
        FormModificarEquipo.Show()
    End Sub

    Private Sub BajaToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles BajaToolStripMenuItem.Click
        FormBajaEquipo.MdiParent = Me
        FormBajaEquipo.Show()
    End Sub

    Private Sub AltaToolStripMenuItem3_Click(sender As Object, e As EventArgs) Handles AltaToolStripMenuItem3.Click
        FormAltaUsuario.MdiParent = Me
        FormAltaUsuario.Show()
    End Sub

    Private Sub ConsultaToolStripMenuItem3_Click(sender As Object, e As EventArgs) Handles ConsultaToolStripMenuItem3.Click
        FormModificarUsuario.MdiParent = Me
        FormModificarUsuario.Show()
    End Sub

    Private Sub BajaToolStripMenuItem3_Click(sender As Object, e As EventArgs) Handles BajaToolStripMenuItem3.Click
        FormBajaUsuario.MdiParent = Me
        FormBajaUsuario.Show()
    End Sub

    Private Sub ToolStripSplitButton1_ButtonClick(sender As Object, e As EventArgs)
        FormBuscarUsuario.MdiParent = Me
        FormBuscarUsuario.Show()
    End Sub

    Private Sub FormEntrada_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
        FormValidar.Close()
    End Sub

    Private Sub RealizarCopiaDeSeguridadToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles RealizarCopiaDeSeguridadToolStripMenuItem.Click
        Dim f As Fichero = New Fichero
        f.Guardar()
    End Sub

    Private Sub RestaurarCopiaDeSeguridadToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles RestaurarCopiaDeSeguridadToolStripMenuItem.Click
        Dim f As Fichero = New Fichero
        f.Restaurar()
    End Sub

    Private Sub SalirToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SalirToolStripMenuItem.Click
        Close()
    End Sub

    Private Sub AltaToolStripMenuItem2_Click(sender As Object, e As EventArgs) Handles AltaToolStripMenuItem2.Click
        FormAltaTorneo.MdiParent = Me
        FormAltaTorneo.Show()
    End Sub

    Private Sub AñadirEquiposToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AñadirEquiposToolStripMenuItem.Click
        FormAnyadirEquiposTorneo.MdiParent = Me
        FormAnyadirEquiposTorneo.Show()
    End Sub

    Private Sub ConsultaToolStripMenuItem2_Click(sender As Object, e As EventArgs) Handles ConsultaToolStripMenuItem2.Click
        FormBuscarTorneo.MdiParent = Me
        FormBuscarTorneo.formularioDestino = "FormModificarTorneo"
        FormBuscarTorneo.Show()
    End Sub

    Private Sub SeleccionarCampeonatoActivoToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SeleccionarCampeonatoActivoToolStripMenuItem.Click
        FormBuscarTorneo.MdiParent = Me
        FormBuscarTorneo.Show()
    End Sub

    Private Sub FormEntrada_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Me.AñadirEquiposToolStripMenuItem.Enabled = False
        Me.ClasificaciónToolStripMenuItem.Enabled = False
        Me.ImprimirClasificaciónToolStripMenuItem.Enabled = False
        Me.GenerarPartidosToolStripMenuItem.Enabled = False
        Me.GestionarPartidosToolStripMenuItem.Enabled = False
    End Sub

    Private Sub BajaToolStripMenuItem2_Click(sender As Object, e As EventArgs) Handles BajaToolStripMenuItem2.Click
        FormBajaTorneo.MdiParent = Me
        FormBajaTorneo.Show()
    End Sub

    Private Sub GenerarPartidosToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles GenerarPartidosToolStripMenuItem.Click
        GenerarPartidos.Show()
        'MsgBox(_NombreTorneo & "-" & _TipoTorneo & "-" & _RondasTorneo & "-" & CampeonatoActivo)
    End Sub

    Private Sub ClasificaciónToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ClasificaciónToolStripMenuItem.Click
        Clasificacion.Show()
    End Sub

    Private Sub GestionarPartidosToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles GestionarPartidosToolStripMenuItem.Click
        GestionPartidos.Show()
    End Sub

    Private Sub ImprimirClasificaciónToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ImprimirClasificaciónToolStripMenuItem.Click
            FormImprimirClasificacion.Show()
    End Sub
End Class